// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
        
      }
    })
  },
  globalData: {
    accountData:{
      accountNumber:"",
      id:0
    },
    apiUrl:"https://dgutlife.qiuxiaodu.cn",
    userInfo:{
      loginState:false,
      avatarUrl:"https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0",
      userName:"默认昵称",
      permission:0,
    },
    role:["未登录","用户","总管理员","一饭一楼管理","一饭三楼管理","二饭管理","三饭管理"],
    canteenList:[]
  }
})
